package com.vvvtimes.demo.controller;

import com.vvvtimes.demo.common.dto.RestResponse;
import com.vvvtimes.demo.domain.dto.DecoderDTO;
import com.vvvtimes.demo.domain.dto.QueryDnsDTO;
import com.vvvtimes.demo.domain.vo.AliDnsResolveVo;
import com.vvvtimes.demo.service.QueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/query")
public class QueryController {
    @Autowired
    private QueryService queryService;

    @RequestMapping(value = "/dns", method = {RequestMethod.POST, RequestMethod.GET})
    public RestResponse<AliDnsResolveVo> dns(@RequestBody QueryDnsDTO queryDnsDTO) {
        return queryService.dns(queryDnsDTO);
    }
}
